<?php
require_once("errors/errors.php");
require_once("views/views.php");

function processMethod($method) {
	global $method_map;
	if (!isset($method_map[$method]))
		renderError(array( type => 'noSuchMethod', message => 'No such method: '.$method)) and die();
	$mth = $method_map[$method];
	$mth();
}
